package com.study.maven;

/**
 * @ClassName HelloFriend
 * @Author: jianghaok
 * @Description //TODO
 * @Date: 2022/3/19
 * @Version 1.0
 */
public class HelloFriend {
    /* HelloFriend工程依赖于Hello工程,在Hello工程中执行mvn install后就会在仓库中打包Hello相关的包
    在HelloFriend工程中引入就可以直接引用Hello工程中的Hello()对象*/
    public String sayHelloToFriend(String name) {
        Hello hello = new Hello();
        String str = hello.sayHello(name) + " I am " + this.getMyName();
        System.out.println(str);
        return str;
    }

    public String getMyName() {
        return "John";
    }
}
